package com.htfc786.reminder.model.dto.family;

import com.htfc786.reminder.model.entity.FamilyMember;
import lombok.Data;

@Data
public class FamilyMemberRequest {
    private Long familyMemberId;
    private String name;
    private Boolean receiveLowStockNotifications;
    private Boolean receiveUsageReminders;

    public static FamilyMember to(FamilyMemberRequest obj) {
        FamilyMember familyMember = new FamilyMember();
        familyMember.setId(obj.familyMemberId);
        familyMember.setName(obj.name);
        familyMember.setReceiveLowStockNotifications(obj.receiveLowStockNotifications);
        familyMember.setReceiveUsageReminders(obj.receiveUsageReminders);
        return familyMember;
    }

}
